package com.stylefeng.guns.modular.purchase.service;

import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.stylefeng.guns.modular.dto.ReturnGoodsAddRequest;
import com.stylefeng.guns.modular.dto.ReturnListQueryRequest;
import com.stylefeng.guns.modular.system.model.GoodsReturn;
import com.baomidou.mybatisplus.service.IService;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author LiuXin
 * @since 2018-09-12
 */
public interface IGoodsReturnService extends IService<GoodsReturn> {

    /**
     * 退货列表加上数据范围
     * @param page 分页条件
     * @param request 条件封装
     * @return
     */
    Page<GoodsReturn> selectReturnPageAndDataScope(Page<GoodsReturn> page,ReturnListQueryRequest request);

    /**
     * 插入订单和商品
     */
    boolean insertListAndGoods(ReturnGoodsAddRequest request);


    /**
     * 删除订单和订单下面的商品
     * @param goodsReturnListId 订单id
     * @return true false
     */
    boolean deleteOrderAndGoods(Long goodsReturnListId);


}
